import request from '@/utils/request'

// 查询题目列表
export function listQuestion(query) {
  return request({
    url: '/business/question/list',
    method: 'get',
    params: query
  })
}

// 查询题目详细
export function getQuestion(id) {
  return request({
    url: '/business/question/' + id,
    method: 'get'
  })
}

// 新增题目
export function addQuestion(data) {
  return request({
    url: '/business/question',
    method: 'post',
    data: data
  })
}

// 修改题目
export function updateQuestion(data) {
  return request({
    url: '/business/question',
    method: 'put',
    data: data
  })
}

// 删除题目
export function delQuestion(id) {
  return request({
    url: '/business/question/' + id,
    method: 'delete'
  })
}


// 查询我的联系题

// 查询题目列表
export function myListQuestion(query) {
  return request({
    url: '/business/question/myList',
    method: 'get',
    params: query
  })
}

export function markQuestionApi(id){
  console.log(id)
  return request({
    url: '/business/question/markQuestion/'+id,
    method: 'get' 
  })
}


export function unmarkQuestionApi(id){
  console.log(id)
  return request({
    url: '/business/question/unMarkQuestion/'+id,
    method: 'get' 
  })
}
export function submitPractice(data){
  return request({
    url: '/business/question/submitPractice',
    method: 'post',
    data: data
  })
}